#ifndef _VARCLASSTMP_H
#define _VARCLASSTMP_H

//可变参类模板
template <typename... T> class VarClass{ };
 
template <> 
class VarClass<>
{ 
public:
    VarClass()
    {
        std::cout << "no parameter" << std::endl;
    }
};

template <typename first, typename ...other>
class VarClass<first, other...> : private VarClass<other...>
{
private:
    first m_value;
public:
    VarClass()
    {
        m_value = 0;
    }
    VarClass(first parf, other... paro):VarClass<other...>(paro...), m_value(parf)
    {
        std::cout << "m_value = " << m_value << std::endl;
    }
};

#endif //_VARCLASSTMP_H